package com.aw.guiguzi.net;

import com.aw.baselib.net.api.RetrofitClient;
import com.aw.guiguzi.constants.UrlConstant;
import com.aw.guiguzi.net.services.INetService;

import okhttp3.OkHttpClient;

public class NetClient extends RetrofitClient {

    public NetClient() {
        super();
    }

    /**
     * 静态内部类实例
     */
    private static class ApiHolder {
        private static NetClient mApi = new NetClient();
        private final static INetService mCommonService = mApi.builderRetrofit(UrlConstant.BASE_URL).create(INetService.class);
    }

    public static INetService getCommonService() {
        return ApiHolder.mCommonService;
    }

    @Override
    protected OkHttpClient.Builder setClient() {
        return getOkhttp();
    }
}
